from django.db import models
from apps.common.base.models import BaseModel

class Coursecate(BaseModel):

    name = models.CharField("名称", max_length=200, blank=True, null=True, default='')
    key = models.CharField("关键字", max_length=200, blank=True, null=True, default='')

    parent = models.ForeignKey('self', related_name='parent_coursecate', verbose_name='上级分类', on_delete=models.SET_NULL, null=True, blank=True, db_constraint=False)
    
    class Meta:
        verbose_name = 'Coursecate'
        verbose_name_plural = verbose_name
